package com.konne.nightmare.FastPublicOpinion.ui.information.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.BarUtils;
import com.konne.nightmare.FastPublicOpinion.R;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpActivity;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpPresenter;
import com.konne.nightmare.FastPublicOpinion.ui.dialog.InputDialog;
import com.konne.nightmare.FastPublicOpinion.utils.LoadProgressDialog;

import butterknife.BindView;

/**
 * Create by ws.
 * on Data:2022/2/12  Time:下午 4:39.
 * description: 查重设置 .
 */
public class JobSustainSettingAct extends BaseMvpActivity implements View.OnClickListener {
    public static void start() {
        ActivityUtils.startActivity(JobSustainSettingAct.class);
    }

    @Override
    protected BaseMvpPresenter createPresenter() {
        return new BaseMvpPresenter();
    }

    @Override
    public int getLayout() {
        return R.layout.act_job_sustain_setting;
    }

    @Override
    public void initView() {
        BarUtils.transparentStatusBar(this);
        BarUtils.setStatusBarLightMode(this, true);
        findViewById(R.id.itv_alert).setOnClickListener(this);
        findViewById(R.id.itv_repetition_rate).setOnClickListener(this);

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.itv_alert:
                new InputDialog(this).setTitle("查重警戒值").setInputListener(new InputDialog.InputListener() {
                    @Override
                    public void input(String txt) {
                        ((TextView)findViewById(R.id.tv_alert)).setText(txt);
                    }
                }).show();
                break;
            case R.id.itv_repetition_rate:
                new InputDialog(this).setTitle("重复率上限").setInputListener(new InputDialog.InputListener() {
                    @Override
                    public void input(String txt) {
                        ((TextView)findViewById(R.id.tv_repetition_rate)).setText(txt);
                    }
                }).show();
                break;
        }
    }

    @Override
    public void initData(Bundle savedInstanceState) {

    }

    @Override
    public LoadProgressDialog getLoadDialog() {
        return null;
    }

    @Override
    public void cancelLoadDialog() {

    }
}
